var schemaDataConfigWin;
var schemaDataConfigForm;
function showSchemaDataConfigWin(solr_core_name,solr_url_id){
	initSchemaDataConfigForm();
	reGetWidthAndHeight();
	schemaDataConfigWin = Ext.create('Ext.window.Window',{
		layout:'border',
		width:clientWidth,                    
		height:clientHeight, 
		maximized:true,
		maximizable:true,
		minimizable:true,
		animateTarget:document.body,
		plain:true,
		modal:true,
		title:'导入、映射索引',
		listeners:{
			minimize:function(win,opts){
				if(!win.collapse()){
					win.collapse();
				}else{
					win.expand();
				}
			}
		},
		items:schemaDataConfigForm,
		buttons:[{
			text:'关闭',
			itemId:'close',
			handler:function(button){
				schemaDataConfigWin.close();
			}
		}]
	});
	schemaDataConfigWin.show();
	loadFormData(schemaDataConfigForm,'../solrCoreController/getSchemaDataConfig?solr_core_name='+ solr_core_name+'&solr_url_id='+solr_url_id);
}
function initSchemaDataConfigForm(){
	reGetWidthAndHeight();
	var dataConfigTab = Ext.create('Ext.TabPanel',{
		activeTab:0,
		region:'center',
		tabPosition:'left',
		items:[{
			title:'配置映射索引',
			layout:"fit",
			autoScroll:true,
		    items:[{	
					xtype:'textareafield',
					width:clientWidth, 
					height:clientHeight,  
					name:'dataConfig',
					allowBlank:false,
					anchor:'100%'
		    	  }]
		 },
		 {
		 	title:'索引',
		 	layout:"fit",
		    items:[{	
					xtype:'textareafield',
					width:clientWidth, 
					height:clientHeight,           
					name:'schema',
					autoScroll:true,
					allowBlank:false,
					anchor:'100%'
		    	  }]
		 }]
	})
	schemaDataConfigForm = Ext.create('Ext.FormPanel',{
		xtype:'form',
		region:'center',
		waitMsgTarget:true,
		defaultType:'textfield',
		autoScroll:false,
		fieldDefaults:{
			labelWidth:70,
			labelAlign:'left',
			flex:1,
			margin:'2 5 4 5'
		},
		items:[
		{
			fieldLabel:'实例主键',
			xtype:'textfield',
			hidden:true,
			name:'solr_core_id',
			allowBlank:false,
			maxLength:32,
			anchor:'100%'
		},
		{
			fieldLabel:'实例名称',
			xtype:'textfield',
			hidden:true,
			name:'solr_core_name',
			allowBlank:false,
			readOnly:true,
			maxLength:200,
			anchor:'100%'
		},
		dataConfigTab,
		dataConfigTab
		]
	});
}